import java.util.Scanner;
/**
 * Beginnings of Umbra Email Client for integration with Finis.
 * 
 * @author FinaleTI
 * @version 6/14/2011
 * 
 * Credits:
 * SendMailSSL - http://www.mkyong.com/java/javamail-api-sending-email-via-gmail-smtp-example/
 * ReadMail - http://forums.oracle.com/forums/thread.jspa?threadID=2164818&tstart=45 (by Shanu)
 */
public class UmbraEmailClient
{
    public static void main(String[] args)
    { 
        Scanner in = new Scanner(System.in);
        System.out.print("Send to: ");
        String sendTo = in.nextLine();  

        System.out.print("Subject: ");
        String subject = in.nextLine();

        String message = "";
        String msgLine = "a";

        while(!msgLine.equalsIgnoreCase("ENDMESSAGE"))
        {
            System.out.print("Message: ");
            msgLine = in.nextLine();
            System.out.println("**"+msgLine+"**");
            if(!msgLine.equalsIgnoreCase("ENDMESSAGE"))
                message += msgLine + "\n";
        }

        SendMailSSL.sendMail("danielmuckerman@gmail.com", "tiZ80ZILog", sendTo, subject, message + "\n-----\nSent from Finis's email client, Umbra");
    }
}
